package com.viking.car;

public class MessageBody {
    private String body;     //请求消息中代表token，响应消息代表响应码
    private Short power;     //剩余电量（响应消息中）
    private boolean response;//区别是服务端响应的消息或者客户端发送的消息

    public Short getPower() {
        return power;
    }

    public void setPower(short power) {
        this.power = power;
    }

    public boolean isResponse() {
        return response;
    }

    public void setResponse(boolean response) {
        this.response = response;
    }

    public MessageBody() {
    }
    public MessageBody(String body) {
        this.body = body;
    }

    public MessageBody(String body, short power) {
        this.body = body;
        this.power = power;
    }

    public MessageBody(String body,boolean response) {
        this.body = body;
        this.response = response;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    @Override
    public String toString() {
        return "MessageBody{" +
                "body='" + body + '\'' +
                ", power=" + power +
                '}';
    }
}
